const path = require('path');


module.exports = {
  entry: {
    app: './src/App.js'
  },
  output: {
    filename: 'bundle.js',
    path: path.resolve(__dirname)
  },
  target: "electron-preload",

  // node: {
  //   fs: 'empty'
  // },

  module: {
    rules: [
      {
        test: /\.js$/, // include .js files
        enforce: "pre", // preload the jshint loader
        exclude: /node_modules/, // exclude any and all files in the node_modules folder
        use: [{
          loader: "babel-loader",
          query: {
            presets: ["@babel/preset-env", "@babel/preset-react",]
          }
        }]
      },
      {
        test: /\.s?[ac]ss$/i,
        use: [
          // Creates `style` nodes from JS strings
          'style-loader',
          // Translates CSS into CommonJS
          'css-loader',
          // Compiles Sass to CSS
          'sass-loader',
        ],
      },
  ]
  },
};